package com.swiftops.common.service;

import com.swiftops.common.model.User;
import org.springframework.stereotype.Service;

@Service
public class ThreadLocalUserService {

    private ThreadLocal<User> loginUser = new ThreadLocal<User>();

    public void setUser(User user) {
        loginUser.set(user);
    }

    public User getUser() {
        return loginUser.get();
    }
}
